using System.Linq;
using System.Text;
using System.Diagnostics;
using System.Runtime.Serialization;
using System.Collections;
using System.Data;
using System.ComponentModel;
using System.Data.OracleClient;
using WPFExcelReport.Helpers;
using WPFExcelReport.Controls;
namespace WPFExcelReport
{
    public partial class VVKSKI
    {
        public DataRow Convert2VKSKI(DataRow dwInput, string ITXDBVERSION, bool IsConvert = false)
        {
            DataSet SResult = new DataSet();
            SResult = QueryVKSKI(dwInput, 0);
            DataRow dwReturn = null;
            if (SResult.Tables[0].Rows.Count > 0)
            {
                dwReturn = SResult.Tables[0].Rows[0];
            }
            else
            {
                dwReturn = SResult.Tables[0].NewRow();
            }
            switch (ITXDBVERSION)
            {
                case "YGR":
                    #region=========
         dwReturn["VKIMANDANT"] = " ".PadRight(2 ); 
         dwReturn["VKIAUFKRS"] = " ".PadRight(2 ); 
         dwReturn["VKIAUFLFD"] = " ".PadRight(6 ); 
         dwReturn["VKIAUFPOS"] = " ".PadRight(3 ); 
         dwReturn["VKIAENDZL"] = " ".PadRight(0 ); 
         dwReturn["VKIAENDBEN"] = " ".PadRight(8 ); 
         dwReturn["VKIAENDDAT"] = " ".PadRight(0 ); 
         dwReturn["VKINEUBEN"] = " ".PadRight(8 ); 
         dwReturn["VKINEUDAT"] = " ".PadRight(0 ); 
         dwReturn["VKILAE1"] = " ".PadRight(0 ); 
         dwReturn["VKIRICHTUNG1"] = " ".PadRight(1 ); 
         dwReturn["VKIDIAGONALE1"] = " ".PadRight(1 ); 
         dwReturn["VKILAE2"] = " ".PadRight(0 ); 
         dwReturn["VKIRICHTUNG2"] = " ".PadRight(1 ); 
         dwReturn["VKIDIAGONALE2"] = " ".PadRight(1 ); 
         dwReturn["VKILAE3"] = " ".PadRight(0 ); 
         dwReturn["VKIRICHTUNG3"] = " ".PadRight(1 ); 
         dwReturn["VKIDIAGONALE3"] = " ".PadRight(1 ); 
         dwReturn["VKILAE4"] = " ".PadRight(0 ); 
         dwReturn["VKIRICHTUNG4"] = " ".PadRight(1 ); 
         dwReturn["VKIDIAGONALE4"] = " ".PadRight(1 ); 
         dwReturn["VKILAE5"] = " ".PadRight(0 ); 
         dwReturn["VKIRICHTUNG5"] = " ".PadRight(1 ); 
         dwReturn["VKIDIAGONALE5"] = " ".PadRight(1 ); 
         dwReturn["VKILAE6"] = " ".PadRight(0 ); 
         dwReturn["VKIRICHTUNG6"] = " ".PadRight(1 ); 
         dwReturn["VKIDIAGONALE6"] = " ".PadRight(1 ); 
         dwReturn["VKILAE7"] = " ".PadRight(0 ); 
         dwReturn["VKIRICHTUNG7"] = " ".PadRight(1 ); 
         dwReturn["VKIDIAGONALE7"] = " ".PadRight(1 ); 
         dwReturn["VKILAE8"] = " ".PadRight(0 ); 
         dwReturn["VKIRICHTUNG8"] = " ".PadRight(1 ); 
         dwReturn["VKIDIAGONALE8"] = " ".PadRight(1 ); 
         dwReturn["VKILAE9"] = " ".PadRight(0 ); 
         dwReturn["VKIRICHTUNG9"] = " ".PadRight(1 ); 
         dwReturn["VKIDIAGONALE9"] = " ".PadRight(1 ); 
         dwReturn["VKILAE10"] = " ".PadRight(0 ); 
         dwReturn["VKIRICHTUNG10"] = " ".PadRight(1 ); 
         dwReturn["VKIDIAGONALE10"] = " ".PadRight(1 ); 
         dwReturn["VKILAE11"] = " ".PadRight(0 ); 
         dwReturn["VKIRICHTUNG11"] = " ".PadRight(1 ); 
         dwReturn["VKIDIAGONALE11"] = " ".PadRight(1 ); 
         dwReturn["VKILAE12"] = " ".PadRight(0 ); 
         dwReturn["VKIRICHTUNG12"] = " ".PadRight(1 ); 
         dwReturn["VKIDIAGONALE12"] = " ".PadRight(1 ); 
         dwReturn["VKILAE13"] = " ".PadRight(0 ); 
         dwReturn["VKIRICHTUNG13"] = " ".PadRight(1 ); 
         dwReturn["VKIDIAGONALE13"] = " ".PadRight(1 ); 
         dwReturn["VKILAE14"] = " ".PadRight(0 ); 
         dwReturn["VKIRICHTUNG14"] = " ".PadRight(1 ); 
         dwReturn["VKIDIAGONALE14"] = " ".PadRight(1 ); 
         dwReturn["VKILAE15"] = " ".PadRight(0 ); 
         dwReturn["VKIRICHTUNG15"] = " ".PadRight(1 ); 
         dwReturn["VKIDIAGONALE15"] = " ".PadRight(1 ); 
         dwReturn["VKILAE16"] = " ".PadRight(0 ); 
         dwReturn["VKIRICHTUNG16"] = " ".PadRight(1 ); 
         dwReturn["VKIDIAGONALE16"] = " ".PadRight(1 ); 
         dwReturn["VKILAE17"] = " ".PadRight(0 ); 
         dwReturn["VKIRICHTUNG17"] = " ".PadRight(1 ); 
         dwReturn["VKIDIAGONALE17"] = " ".PadRight(1 ); 
         dwReturn["VKILAE18"] = " ".PadRight(0 ); 
         dwReturn["VKIRICHTUNG18"] = " ".PadRight(1 ); 
         dwReturn["VKIDIAGONALE18"] = " ".PadRight(1 ); 
         dwReturn["VKILAE19"] = " ".PadRight(0 ); 
         dwReturn["VKIRICHTUNG19"] = " ".PadRight(1 ); 
         dwReturn["VKIDIAGONALE19"] = " ".PadRight(1 ); 
         dwReturn["VKILAE20"] = " ".PadRight(0 ); 
         dwReturn["VKIRICHTUNG20"] = " ".PadRight(1 ); 
         dwReturn["VKIDIAGONALE20"] = " ".PadRight(1 ); 
         dwReturn["VKILAE21"] = " ".PadRight(0 ); 
         dwReturn["VKIRICHTUNG21"] = " ".PadRight(1 ); 
         dwReturn["VKIDIAGONALE21"] = " ".PadRight(1 ); 
         dwReturn["VKILAE22"] = " ".PadRight(0 ); 
         dwReturn["VKIRICHTUNG22"] = " ".PadRight(1 ); 
         dwReturn["VKIDIAGONALE22"] = " ".PadRight(1 ); 
         dwReturn["VKILAE23"] = " ".PadRight(0 ); 
         dwReturn["VKIRICHTUNG23"] = " ".PadRight(1 ); 
         dwReturn["VKIDIAGONALE23"] = " ".PadRight(1 ); 
         dwReturn["VKILAE24"] = " ".PadRight(0 ); 
         dwReturn["VKIRICHTUNG24"] = " ".PadRight(1 ); 
         dwReturn["VKIDIAGONALE24"] = " ".PadRight(1 ); 
         dwReturn["VKILAE25"] = " ".PadRight(0 ); 
         dwReturn["VKIRICHTUNG25"] = " ".PadRight(1 ); 
         dwReturn["VKIDIAGONALE25"] = " ".PadRight(1 ); 
         dwReturn["VKILAE26"] = " ".PadRight(0 ); 
         dwReturn["VKIRICHTUNG26"] = " ".PadRight(1 ); 
         dwReturn["VKIDIAGONALE26"] = " ".PadRight(1 ); 
         dwReturn["VKILAE27"] = " ".PadRight(0 ); 
         dwReturn["VKIRICHTUNG27"] = " ".PadRight(1 ); 
         dwReturn["VKIDIAGONALE27"] = " ".PadRight(1 ); 
         dwReturn["VKILAE28"] = " ".PadRight(0 ); 
         dwReturn["VKIRICHTUNG28"] = " ".PadRight(1 ); 
         dwReturn["VKIDIAGONALE28"] = " ".PadRight(1 ); 
         dwReturn["VKILAE29"] = " ".PadRight(0 ); 
         dwReturn["VKIRICHTUNG29"] = " ".PadRight(1 ); 
         dwReturn["VKIDIAGONALE29"] = " ".PadRight(1 ); 
         dwReturn["VKILAE30"] = " ".PadRight(0 ); 
         dwReturn["VKIRICHTUNG30"] = " ".PadRight(1 ); 
         dwReturn["VKIDIAGONALE30"] = " ".PadRight(1 ); 
         dwReturn["VKIFSTKLG"] = " ".PadRight(0 ); 
         dwReturn["VKIFBRT"] = " ".PadRight(0 ); 
         dwReturn["VKIMAXSTKLG"] = " ".PadRight(0 ); 
         dwReturn["VKIMAXBRT"] = " ".PadRight(0 ); 
         dwReturn["VKIQM"] = " ".PadRight(0 ); 
         dwReturn["VKIVERSCHNITT"] = " ".PadRight(0 ); 
         dwReturn["VKIFILLER"] = " ".PadRight(39 ); 
                    #endregion
                    break;
                case "JLT":

                    break;
                default:

                    break;
            }
            if (IsConvert)
            {
                foreach (DataColumn cm in dwInput.Table.Columns)
                {
                    if (dwInput[cm.ColumnName].ToString() == "")
                        continue;
                    if (dwReturn.Table.Columns.Contains(cm.ColumnName))
                    {
                        dwReturn[cm.ColumnName] = dwInput[cm.ColumnName];
                    }
                }
            }
            return dwReturn;
        }
        public void MapVKSKI(ref DataRow dwLocal, DataRow dwData)
        {
            BlindMap(ref dwLocal, dwData);
        }
        public void SaveVKSKI(DataRow dwData, string ITXDBVERSION = "50.24")
        {
            DataSet setResult = new DataSet();
            DataTable tbLocal = null;
            DataRow dwLocal = null;
            bool flgExist = false;
            setResult = QueryVKSKI(dwData);
            if (setResult.Tables.Count > 0)
            {
                tbLocal = setResult.Tables[0];
                if (tbLocal.Rows.Count > 0)
                {
                    flgExist = true;
                    dwLocal = tbLocal.Rows[0];
                }
                else
                {
                    dwLocal = tbLocal.NewRow();
                }
            }
            MapVKSKI(ref dwLocal, dwData);

            if (!flgExist)
            {

                InsertVKSKI(dwLocal, ITXDBVERSION);
            }
            UpdateVKSKI(dwLocal);
        }
        public void InsertVKSKI(DataRow dwData, string ITXDBVERSION = "50.24")
        {
            OracleCommand or1;
            or1 = OracleDB.CreateCommand();
            switch (ITXDBVERSION)
            {
                case "YGR":
                    or1.CommandText = "INSERT INTO VKSKI(VAKBMANDANT, VAKBKOLL, VAKBART, VAKBKUNDNR, VAKBFARBE, VAKBKDARTNR, VAKBKDARTBEZ, VAKBKDFARBNR, VAKBANDRUCK, VAKBMEGEW, VAKBMENGEH, VAKBGEWVON, VAKBGEWBIS, VAKBGEWCA, VAKBGEWFKT, VAKBGEWGRP, VAKBMEGFKT, VAKBMEGGRP, VAKBAENDZL, VAKBAENDBEN, VAKBAENDDAT, VAKBNEUBEN, VAKBNEUDAT, VAKBFILLER)"
                        + " VALUES (:VAKBMANDANT, :VAKBKOLL, :VAKBART, :VAKBKUNDNR, :VAKBFARBE, '                         ', '                         ', '                             ', ' ', '   ', '   ', 0, 0, ' ', '000000000000', ' ', '000000000000', ' ', 0, '        ', '000000', '        ', '      ', '                                          ')";
                    or1.Parameters.Add("VAKBMANDANT", OracleType.NVarChar).Value = dwData["VAKBMANDANT"].ToString();
                    or1.Parameters.Add("VAKBKOLL", OracleType.NVarChar).Value = dwData["VAKBKOLL"].ToString();
                    or1.Parameters.Add("VAKBART", OracleType.NVarChar).Value = dwData["VAKBART"].ToString();
                    or1.Parameters.Add("VAKBFARBE", OracleType.NVarChar).Value = dwData["VAKBFARBE"].ToString();
                    or1.Parameters.Add("VAKBKUNDNR", OracleType.NVarChar).Value = dwData["VAKBKUNDNR"].ToString();
                    break;
                //VAFMANDANT VAFKOLL VAFART VAFFARBE VAFBEZ VAFFFARBE

            }
            
            Connect2Proxy(or1);
        }
        public DataSet QueryVKSKI(DataRow dwData, int option = 1)
        {
            DataSet Return;
            DataSet Result = new DataSet();
            OracleCommand or1 = OracleDB.CreateCommand();
            switch (option)
            {
                case 0:
                    or1.CommandText = "SELECT * FROM VKSKI WHERE  ROWNUM<2 ";
                    break;
              
                case 99:
                    or1.CommandText = "SELECT * FROM VKSKI  WHERE ROWNUM<50";
                    break;
                default:
                    break;
            }
            Result = Connect2Proxy(or1);
            if (Result.Tables.Count > 0)
                Result.Tables[0].TableName = "VKSKI";
            Return = Result;
            return Return;
        }
        public void DeleteVKSKI(DataRow dwData, int option = 1)
        {

            OracleCommand or1 = OracleDB.CreateCommand();
            switch (option)
            {
                case 1:
                    or1.CommandText = "DELETE FROM VKSKI   WHERE  VAKBMANDANT=:VAKBMANDANT AND VAKBKOLL=:VAKBKOLL AND VAKBART =:VAKBART AND VAKBFARBE=:VAKBFARBE AND VAKBKUNDNR=:VAKBKUNDNR";
                     or1.Parameters.Add("VAKBMANDANT", OracleType.NVarChar).Value = dwData["VAKBMANDANT"].ToString();
                    or1.Parameters.Add("VAKBKOLL", OracleType.NVarChar).Value = dwData["VAKBKOLL"].ToString();
                    or1.Parameters.Add("VAKBART", OracleType.NVarChar).Value = dwData["VAKBART"].ToString();
                    or1.Parameters.Add("VAKBFARBE", OracleType.NVarChar).Value = dwData["VAKBFARBE"].ToString();
                    or1.Parameters.Add("VAKBKUNDNR", OracleType.NVarChar).Value = dwData["VAKBKUNDNR"].ToString();
                    break;
                default:
                    break;
            }
            Connect2Proxy(or1);
        } 
      
        public void UpdateVKSKI(DataRow dwData, string ITXDBVERSION = "50.24", int option = 1)
        {
            OracleCommand or1;
            DataSet Result = new DataSet();
            or1 = OracleDB.CreateCommand();
            switch (option)
            {
                case 1:
                    #region====Command==== 
                    or1.CommandText = "UPDATE VKSKI SET "
                    +"VKIMANDANT= :VKIMANDANT,"
                    +"VKIAUFKRS= :VKIAUFKRS,"
                    +"VKIAUFLFD= :VKIAUFLFD,"
                    +"VKIAUFPOS= :VKIAUFPOS,"
                    +"VKIAENDZL= :VKIAENDZL,"
                    +"VKIAENDBEN= :VKIAENDBEN,"
                    +"VKIAENDDAT= :VKIAENDDAT,"
                    +"VKINEUBEN= :VKINEUBEN,"
                    +"VKINEUDAT= :VKINEUDAT,"
                    +"VKILAE1= :VKILAE1,"
                    +"VKIRICHTUNG1= :VKIRICHTUNG1,"
                    +"VKIDIAGONALE1= :VKIDIAGONALE1,"
                    +"VKILAE2= :VKILAE2,"
                    +"VKIRICHTUNG2= :VKIRICHTUNG2,"
                    +"VKIDIAGONALE2= :VKIDIAGONALE2,"
                    +"VKILAE3= :VKILAE3,"
                    +"VKIRICHTUNG3= :VKIRICHTUNG3,"
                    +"VKIDIAGONALE3= :VKIDIAGONALE3,"
                    +"VKILAE4= :VKILAE4,"
                    +"VKIRICHTUNG4= :VKIRICHTUNG4,"
                    +"VKIDIAGONALE4= :VKIDIAGONALE4,"
                    +"VKILAE5= :VKILAE5,"
                    +"VKIRICHTUNG5= :VKIRICHTUNG5,"
                    +"VKIDIAGONALE5= :VKIDIAGONALE5,"
                    +"VKILAE6= :VKILAE6,"
                    +"VKIRICHTUNG6= :VKIRICHTUNG6,"
                    +"VKIDIAGONALE6= :VKIDIAGONALE6,"
                    +"VKILAE7= :VKILAE7,"
                    +"VKIRICHTUNG7= :VKIRICHTUNG7,"
                    +"VKIDIAGONALE7= :VKIDIAGONALE7,"
                    +"VKILAE8= :VKILAE8,"
                    +"VKIRICHTUNG8= :VKIRICHTUNG8,"
                    +"VKIDIAGONALE8= :VKIDIAGONALE8,"
                    +"VKILAE9= :VKILAE9,"
                    +"VKIRICHTUNG9= :VKIRICHTUNG9,"
                    +"VKIDIAGONALE9= :VKIDIAGONALE9,"
                    +"VKILAE10= :VKILAE10,"
                    +"VKIRICHTUNG10= :VKIRICHTUNG10,"
                    +"VKIDIAGONALE10= :VKIDIAGONALE10,"
                    +"VKILAE11= :VKILAE11,"
                    +"VKIRICHTUNG11= :VKIRICHTUNG11,"
                    +"VKIDIAGONALE11= :VKIDIAGONALE11,"
                    +"VKILAE12= :VKILAE12,"
                    +"VKIRICHTUNG12= :VKIRICHTUNG12,"
                    +"VKIDIAGONALE12= :VKIDIAGONALE12,"
                    +"VKILAE13= :VKILAE13,"
                    +"VKIRICHTUNG13= :VKIRICHTUNG13,"
                    +"VKIDIAGONALE13= :VKIDIAGONALE13,"
                    +"VKILAE14= :VKILAE14,"
                    +"VKIRICHTUNG14= :VKIRICHTUNG14,"
                    +"VKIDIAGONALE14= :VKIDIAGONALE14,"
                    +"VKILAE15= :VKILAE15,"
                    +"VKIRICHTUNG15= :VKIRICHTUNG15,"
                    +"VKIDIAGONALE15= :VKIDIAGONALE15,"
                    +"VKILAE16= :VKILAE16,"
                    +"VKIRICHTUNG16= :VKIRICHTUNG16,"
                    +"VKIDIAGONALE16= :VKIDIAGONALE16,"
                    +"VKILAE17= :VKILAE17,"
                    +"VKIRICHTUNG17= :VKIRICHTUNG17,"
                    +"VKIDIAGONALE17= :VKIDIAGONALE17,"
                    +"VKILAE18= :VKILAE18,"
                    +"VKIRICHTUNG18= :VKIRICHTUNG18,"
                    +"VKIDIAGONALE18= :VKIDIAGONALE18,"
                    +"VKILAE19= :VKILAE19,"
                    +"VKIRICHTUNG19= :VKIRICHTUNG19,"
                    +"VKIDIAGONALE19= :VKIDIAGONALE19,"
                    +"VKILAE20= :VKILAE20,"
                    +"VKIRICHTUNG20= :VKIRICHTUNG20,"
                    +"VKIDIAGONALE20= :VKIDIAGONALE20,"
                    +"VKILAE21= :VKILAE21,"
                    +"VKIRICHTUNG21= :VKIRICHTUNG21,"
                    +"VKIDIAGONALE21= :VKIDIAGONALE21,"
                    +"VKILAE22= :VKILAE22,"
                    +"VKIRICHTUNG22= :VKIRICHTUNG22,"
                    +"VKIDIAGONALE22= :VKIDIAGONALE22,"
                    +"VKILAE23= :VKILAE23,"
                    +"VKIRICHTUNG23= :VKIRICHTUNG23,"
                    +"VKIDIAGONALE23= :VKIDIAGONALE23,"
                    +"VKILAE24= :VKILAE24,"
                    +"VKIRICHTUNG24= :VKIRICHTUNG24,"
                    +"VKIDIAGONALE24= :VKIDIAGONALE24,"
                    +"VKILAE25= :VKILAE25,"
                    +"VKIRICHTUNG25= :VKIRICHTUNG25,"
                    +"VKIDIAGONALE25= :VKIDIAGONALE25,"
                    +"VKILAE26= :VKILAE26,"
                    +"VKIRICHTUNG26= :VKIRICHTUNG26,"
                    +"VKIDIAGONALE26= :VKIDIAGONALE26,"
                    +"VKILAE27= :VKILAE27,"
                    +"VKIRICHTUNG27= :VKIRICHTUNG27,"
                    +"VKIDIAGONALE27= :VKIDIAGONALE27,"
                    +"VKILAE28= :VKILAE28,"
                    +"VKIRICHTUNG28= :VKIRICHTUNG28,"
                    +"VKIDIAGONALE28= :VKIDIAGONALE28,"
                    +"VKILAE29= :VKILAE29,"
                    +"VKIRICHTUNG29= :VKIRICHTUNG29,"
                    +"VKIDIAGONALE29= :VKIDIAGONALE29,"
                    +"VKILAE30= :VKILAE30,"
                    +"VKIRICHTUNG30= :VKIRICHTUNG30,"
                    +"VKIDIAGONALE30= :VKIDIAGONALE30,"
                    +"VKIFSTKLG= :VKIFSTKLG,"
                    +"VKIFBRT= :VKIFBRT,"
                    +"VKIMAXSTKLG= :VKIMAXSTKLG,"
                    +"VKIMAXBRT= :VKIMAXBRT,"
                    +"VKIQM= :VKIQM,"
                    +"VKIVERSCHNITT= :VKIVERSCHNITT,"
                    +"VKIFILLER= :VKIFILLER,"
                        + " WHERE  "
                        + "  VAKBMANDANT=:VAKBMANDANT AND VAKBKOLL=:VAKBKOLL AND VAKBART =:VAKBART AND VAKBFARBE=:VAKBFARBE AND VAKBKUNDNR=:VAKBKUNDNR";
                    #endregion

                    #region====Parameters====
          or1.Parameters.Add("VKIMANDANT", OracleType.NVarChar).Value = dwData["VKIMANDANT"].ToString(); 
          or1.Parameters.Add("VKIAUFKRS", OracleType.NVarChar).Value = dwData["VKIAUFKRS"].ToString(); 
          or1.Parameters.Add("VKIAUFLFD", OracleType.NVarChar).Value = dwData["VKIAUFLFD"].ToString(); 
          or1.Parameters.Add("VKIAUFPOS", OracleType.NVarChar).Value = dwData["VKIAUFPOS"].ToString(); 
          or1.Parameters.Add("VKIAENDZL", OracleType.NVarChar).Value = dwData["VKIAENDZL"].ToString(); 
          or1.Parameters.Add("VKIAENDBEN", OracleType.NVarChar).Value = dwData["VKIAENDBEN"].ToString(); 
          or1.Parameters.Add("VKIAENDDAT", OracleType.NVarChar).Value = dwData["VKIAENDDAT"].ToString(); 
          or1.Parameters.Add("VKINEUBEN", OracleType.NVarChar).Value = dwData["VKINEUBEN"].ToString(); 
          or1.Parameters.Add("VKINEUDAT", OracleType.NVarChar).Value = dwData["VKINEUDAT"].ToString(); 
          or1.Parameters.Add("VKILAE1", OracleType.NVarChar).Value = dwData["VKILAE1"].ToString(); 
          or1.Parameters.Add("VKIRICHTUNG1", OracleType.NVarChar).Value = dwData["VKIRICHTUNG1"].ToString(); 
          or1.Parameters.Add("VKIDIAGONALE1", OracleType.NVarChar).Value = dwData["VKIDIAGONALE1"].ToString(); 
          or1.Parameters.Add("VKILAE2", OracleType.NVarChar).Value = dwData["VKILAE2"].ToString(); 
          or1.Parameters.Add("VKIRICHTUNG2", OracleType.NVarChar).Value = dwData["VKIRICHTUNG2"].ToString(); 
          or1.Parameters.Add("VKIDIAGONALE2", OracleType.NVarChar).Value = dwData["VKIDIAGONALE2"].ToString(); 
          or1.Parameters.Add("VKILAE3", OracleType.NVarChar).Value = dwData["VKILAE3"].ToString(); 
          or1.Parameters.Add("VKIRICHTUNG3", OracleType.NVarChar).Value = dwData["VKIRICHTUNG3"].ToString(); 
          or1.Parameters.Add("VKIDIAGONALE3", OracleType.NVarChar).Value = dwData["VKIDIAGONALE3"].ToString(); 
          or1.Parameters.Add("VKILAE4", OracleType.NVarChar).Value = dwData["VKILAE4"].ToString(); 
          or1.Parameters.Add("VKIRICHTUNG4", OracleType.NVarChar).Value = dwData["VKIRICHTUNG4"].ToString(); 
          or1.Parameters.Add("VKIDIAGONALE4", OracleType.NVarChar).Value = dwData["VKIDIAGONALE4"].ToString(); 
          or1.Parameters.Add("VKILAE5", OracleType.NVarChar).Value = dwData["VKILAE5"].ToString(); 
          or1.Parameters.Add("VKIRICHTUNG5", OracleType.NVarChar).Value = dwData["VKIRICHTUNG5"].ToString(); 
          or1.Parameters.Add("VKIDIAGONALE5", OracleType.NVarChar).Value = dwData["VKIDIAGONALE5"].ToString(); 
          or1.Parameters.Add("VKILAE6", OracleType.NVarChar).Value = dwData["VKILAE6"].ToString(); 
          or1.Parameters.Add("VKIRICHTUNG6", OracleType.NVarChar).Value = dwData["VKIRICHTUNG6"].ToString(); 
          or1.Parameters.Add("VKIDIAGONALE6", OracleType.NVarChar).Value = dwData["VKIDIAGONALE6"].ToString(); 
          or1.Parameters.Add("VKILAE7", OracleType.NVarChar).Value = dwData["VKILAE7"].ToString(); 
          or1.Parameters.Add("VKIRICHTUNG7", OracleType.NVarChar).Value = dwData["VKIRICHTUNG7"].ToString(); 
          or1.Parameters.Add("VKIDIAGONALE7", OracleType.NVarChar).Value = dwData["VKIDIAGONALE7"].ToString(); 
          or1.Parameters.Add("VKILAE8", OracleType.NVarChar).Value = dwData["VKILAE8"].ToString(); 
          or1.Parameters.Add("VKIRICHTUNG8", OracleType.NVarChar).Value = dwData["VKIRICHTUNG8"].ToString(); 
          or1.Parameters.Add("VKIDIAGONALE8", OracleType.NVarChar).Value = dwData["VKIDIAGONALE8"].ToString(); 
          or1.Parameters.Add("VKILAE9", OracleType.NVarChar).Value = dwData["VKILAE9"].ToString(); 
          or1.Parameters.Add("VKIRICHTUNG9", OracleType.NVarChar).Value = dwData["VKIRICHTUNG9"].ToString(); 
          or1.Parameters.Add("VKIDIAGONALE9", OracleType.NVarChar).Value = dwData["VKIDIAGONALE9"].ToString(); 
          or1.Parameters.Add("VKILAE10", OracleType.NVarChar).Value = dwData["VKILAE10"].ToString(); 
          or1.Parameters.Add("VKIRICHTUNG10", OracleType.NVarChar).Value = dwData["VKIRICHTUNG10"].ToString(); 
          or1.Parameters.Add("VKIDIAGONALE10", OracleType.NVarChar).Value = dwData["VKIDIAGONALE10"].ToString(); 
          or1.Parameters.Add("VKILAE11", OracleType.NVarChar).Value = dwData["VKILAE11"].ToString(); 
          or1.Parameters.Add("VKIRICHTUNG11", OracleType.NVarChar).Value = dwData["VKIRICHTUNG11"].ToString(); 
          or1.Parameters.Add("VKIDIAGONALE11", OracleType.NVarChar).Value = dwData["VKIDIAGONALE11"].ToString(); 
          or1.Parameters.Add("VKILAE12", OracleType.NVarChar).Value = dwData["VKILAE12"].ToString(); 
          or1.Parameters.Add("VKIRICHTUNG12", OracleType.NVarChar).Value = dwData["VKIRICHTUNG12"].ToString(); 
          or1.Parameters.Add("VKIDIAGONALE12", OracleType.NVarChar).Value = dwData["VKIDIAGONALE12"].ToString(); 
          or1.Parameters.Add("VKILAE13", OracleType.NVarChar).Value = dwData["VKILAE13"].ToString(); 
          or1.Parameters.Add("VKIRICHTUNG13", OracleType.NVarChar).Value = dwData["VKIRICHTUNG13"].ToString(); 
          or1.Parameters.Add("VKIDIAGONALE13", OracleType.NVarChar).Value = dwData["VKIDIAGONALE13"].ToString(); 
          or1.Parameters.Add("VKILAE14", OracleType.NVarChar).Value = dwData["VKILAE14"].ToString(); 
          or1.Parameters.Add("VKIRICHTUNG14", OracleType.NVarChar).Value = dwData["VKIRICHTUNG14"].ToString(); 
          or1.Parameters.Add("VKIDIAGONALE14", OracleType.NVarChar).Value = dwData["VKIDIAGONALE14"].ToString(); 
          or1.Parameters.Add("VKILAE15", OracleType.NVarChar).Value = dwData["VKILAE15"].ToString(); 
          or1.Parameters.Add("VKIRICHTUNG15", OracleType.NVarChar).Value = dwData["VKIRICHTUNG15"].ToString(); 
          or1.Parameters.Add("VKIDIAGONALE15", OracleType.NVarChar).Value = dwData["VKIDIAGONALE15"].ToString(); 
          or1.Parameters.Add("VKILAE16", OracleType.NVarChar).Value = dwData["VKILAE16"].ToString(); 
          or1.Parameters.Add("VKIRICHTUNG16", OracleType.NVarChar).Value = dwData["VKIRICHTUNG16"].ToString(); 
          or1.Parameters.Add("VKIDIAGONALE16", OracleType.NVarChar).Value = dwData["VKIDIAGONALE16"].ToString(); 
          or1.Parameters.Add("VKILAE17", OracleType.NVarChar).Value = dwData["VKILAE17"].ToString(); 
          or1.Parameters.Add("VKIRICHTUNG17", OracleType.NVarChar).Value = dwData["VKIRICHTUNG17"].ToString(); 
          or1.Parameters.Add("VKIDIAGONALE17", OracleType.NVarChar).Value = dwData["VKIDIAGONALE17"].ToString(); 
          or1.Parameters.Add("VKILAE18", OracleType.NVarChar).Value = dwData["VKILAE18"].ToString(); 
          or1.Parameters.Add("VKIRICHTUNG18", OracleType.NVarChar).Value = dwData["VKIRICHTUNG18"].ToString(); 
          or1.Parameters.Add("VKIDIAGONALE18", OracleType.NVarChar).Value = dwData["VKIDIAGONALE18"].ToString(); 
          or1.Parameters.Add("VKILAE19", OracleType.NVarChar).Value = dwData["VKILAE19"].ToString(); 
          or1.Parameters.Add("VKIRICHTUNG19", OracleType.NVarChar).Value = dwData["VKIRICHTUNG19"].ToString(); 
          or1.Parameters.Add("VKIDIAGONALE19", OracleType.NVarChar).Value = dwData["VKIDIAGONALE19"].ToString(); 
          or1.Parameters.Add("VKILAE20", OracleType.NVarChar).Value = dwData["VKILAE20"].ToString(); 
          or1.Parameters.Add("VKIRICHTUNG20", OracleType.NVarChar).Value = dwData["VKIRICHTUNG20"].ToString(); 
          or1.Parameters.Add("VKIDIAGONALE20", OracleType.NVarChar).Value = dwData["VKIDIAGONALE20"].ToString(); 
          or1.Parameters.Add("VKILAE21", OracleType.NVarChar).Value = dwData["VKILAE21"].ToString(); 
          or1.Parameters.Add("VKIRICHTUNG21", OracleType.NVarChar).Value = dwData["VKIRICHTUNG21"].ToString(); 
          or1.Parameters.Add("VKIDIAGONALE21", OracleType.NVarChar).Value = dwData["VKIDIAGONALE21"].ToString(); 
          or1.Parameters.Add("VKILAE22", OracleType.NVarChar).Value = dwData["VKILAE22"].ToString(); 
          or1.Parameters.Add("VKIRICHTUNG22", OracleType.NVarChar).Value = dwData["VKIRICHTUNG22"].ToString(); 
          or1.Parameters.Add("VKIDIAGONALE22", OracleType.NVarChar).Value = dwData["VKIDIAGONALE22"].ToString(); 
          or1.Parameters.Add("VKILAE23", OracleType.NVarChar).Value = dwData["VKILAE23"].ToString(); 
          or1.Parameters.Add("VKIRICHTUNG23", OracleType.NVarChar).Value = dwData["VKIRICHTUNG23"].ToString(); 
          or1.Parameters.Add("VKIDIAGONALE23", OracleType.NVarChar).Value = dwData["VKIDIAGONALE23"].ToString(); 
          or1.Parameters.Add("VKILAE24", OracleType.NVarChar).Value = dwData["VKILAE24"].ToString(); 
          or1.Parameters.Add("VKIRICHTUNG24", OracleType.NVarChar).Value = dwData["VKIRICHTUNG24"].ToString(); 
          or1.Parameters.Add("VKIDIAGONALE24", OracleType.NVarChar).Value = dwData["VKIDIAGONALE24"].ToString(); 
          or1.Parameters.Add("VKILAE25", OracleType.NVarChar).Value = dwData["VKILAE25"].ToString(); 
          or1.Parameters.Add("VKIRICHTUNG25", OracleType.NVarChar).Value = dwData["VKIRICHTUNG25"].ToString(); 
          or1.Parameters.Add("VKIDIAGONALE25", OracleType.NVarChar).Value = dwData["VKIDIAGONALE25"].ToString(); 
          or1.Parameters.Add("VKILAE26", OracleType.NVarChar).Value = dwData["VKILAE26"].ToString(); 
          or1.Parameters.Add("VKIRICHTUNG26", OracleType.NVarChar).Value = dwData["VKIRICHTUNG26"].ToString(); 
          or1.Parameters.Add("VKIDIAGONALE26", OracleType.NVarChar).Value = dwData["VKIDIAGONALE26"].ToString(); 
          or1.Parameters.Add("VKILAE27", OracleType.NVarChar).Value = dwData["VKILAE27"].ToString(); 
          or1.Parameters.Add("VKIRICHTUNG27", OracleType.NVarChar).Value = dwData["VKIRICHTUNG27"].ToString(); 
          or1.Parameters.Add("VKIDIAGONALE27", OracleType.NVarChar).Value = dwData["VKIDIAGONALE27"].ToString(); 
          or1.Parameters.Add("VKILAE28", OracleType.NVarChar).Value = dwData["VKILAE28"].ToString(); 
          or1.Parameters.Add("VKIRICHTUNG28", OracleType.NVarChar).Value = dwData["VKIRICHTUNG28"].ToString(); 
          or1.Parameters.Add("VKIDIAGONALE28", OracleType.NVarChar).Value = dwData["VKIDIAGONALE28"].ToString(); 
          or1.Parameters.Add("VKILAE29", OracleType.NVarChar).Value = dwData["VKILAE29"].ToString(); 
          or1.Parameters.Add("VKIRICHTUNG29", OracleType.NVarChar).Value = dwData["VKIRICHTUNG29"].ToString(); 
          or1.Parameters.Add("VKIDIAGONALE29", OracleType.NVarChar).Value = dwData["VKIDIAGONALE29"].ToString(); 
          or1.Parameters.Add("VKILAE30", OracleType.NVarChar).Value = dwData["VKILAE30"].ToString(); 
          or1.Parameters.Add("VKIRICHTUNG30", OracleType.NVarChar).Value = dwData["VKIRICHTUNG30"].ToString(); 
          or1.Parameters.Add("VKIDIAGONALE30", OracleType.NVarChar).Value = dwData["VKIDIAGONALE30"].ToString(); 
          or1.Parameters.Add("VKIFSTKLG", OracleType.NVarChar).Value = dwData["VKIFSTKLG"].ToString(); 
          or1.Parameters.Add("VKIFBRT", OracleType.NVarChar).Value = dwData["VKIFBRT"].ToString(); 
          or1.Parameters.Add("VKIMAXSTKLG", OracleType.NVarChar).Value = dwData["VKIMAXSTKLG"].ToString(); 
          or1.Parameters.Add("VKIMAXBRT", OracleType.NVarChar).Value = dwData["VKIMAXBRT"].ToString(); 
          or1.Parameters.Add("VKIQM", OracleType.NVarChar).Value = dwData["VKIQM"].ToString(); 
          or1.Parameters.Add("VKIVERSCHNITT", OracleType.NVarChar).Value = dwData["VKIVERSCHNITT"].ToString(); 
          or1.Parameters.Add("VKIFILLER", OracleType.NVarChar).Value = dwData["VKIFILLER"].ToString(); 
                    #endregion
                    break; 
                default:
                    break;
            }


            Connect2Proxy(or1);
        }
    }
}
